//
// Created by lvyer on 2021/11/19.
//

#ifndef LEARNOPENGL_TEXTURERENDERER_H
#define LEARNOPENGL_TEXTURERENDERER_H


#include <GLES3/gl3.h>
#include <tools/GLTools.h>
#include <tools/LogTools.h>

class TextureRenderer {
public:
    GLuint m_ProgramObj;
    GLuint m_VertexShader;
    GLuint m_FragmentShader;
    int width;
    int height;
    unsigned int VBO, VAO, EBO;
    unsigned int texture;

    TextureRenderer();

    ~TextureRenderer();

    void init();

    void draw();

    void onSurfaceChanged(int width, int height);

    void setImageData(int format, int width, int height, uint8_t *string);
};


#endif //LEARNOPENGL_TEXTURERENDERER_H
